package com.baoyang.controller;

import com.baoyang.entity.BaoyangMenu;
import com.baoyang.service.BaoyangMenuService;
import com.baoyang.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/baoyang/menu")
public class BaoyangMenuController {
    @Resource
    private BaoyangMenuService baoyangMenuService;

    @GetMapping("/getMenu")
    public R getMenu(HttpServletRequest request) {
        List<BaoyangMenu> list = baoyangMenuService.getMenu();
        return R.data(list);
    }

}